﻿@using MvcFileUploader.HtmlHelper
@using MvcFileUploader.Models
@model PhotoBlog.Models.ClientModels.FileUploadVm
@{
    ViewBag.Title = "Upload photos";
    Layout = "../Shared/_Layout.cshtml";
}

@using (Html.BeginForm("Upload", "Photos", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" }))
{
    <fieldset>
        <div class="control-panel">
            <label class="control-label">
                Загрузите файл:
            </label>
            <div class="control-panel">
                @Html.HiddenFor(m => m.AlbumId)
                @Html.TextBox("UploadedFiles[0]", Model.UploadedFiles, new { type = "file" })
            </div>
            <br />
        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-primary">
                Upload
            </button>
        </div>
    </fieldset>
}

@*<div class="well">
    @(
 Html.MvcFileUpload()
        .UploadAt(Url.Action("UploadFile", new { id = Model.AlbumId }))
        .UIStyle(UploadUI.Bootstrap)
        .WithFileTypes(@"/(\.|\/)(jpe?g|png)$/i")
        .WithMaxFileSize(5000000)
        .AddFormField("entityId", "1234")
        .RenderInline("_MvcFileupload")
    )
</div>*@